<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta content="telephone=no" name="format-detection" /> 
<style>
	body > a:first-child,body > a:first-child img{ width: 0px !important; height: 0px !important; overflow: hidden; position: absolute}
	body{padding-bottom: 0 !important;}
</style>
<meta id="viewport" name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
<title>我的学习课程</title>
<link rel="stylesheet" href="{OSSURL}public/mobile/css/resetnew.css">
{php echo register_jssdk();}
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script src="{MODULE_URL}public/mobile/js/jquery.js"></script>
</head>
<body>

    <div id="wrap" class="teacher_inf">
        <dl id="main">
            <dd class="teacher_inf">
                <div class="teacher">
                    <div style=" background-image:url({php echo tomedia($school['logo']);})"></div>
                </div>
                <ul>
                    <li><label></label>我的学习课程</li>
                    <li><label>我的年级：</label>{$category[$xq_id]['sname']}</li>
                    <li><label>我的班级：</label><span>{$category[$bj_id]['sname']}</span></li>
                </ul>  				
                
            </dd>
            <dd class="teacher_count">
                <h3>班级课程列表</h3>
                <ul>
				{loop $list $item}
                           <li class="{if $item['end'] < TIMESTAMP}closed{/if}" href="#">
                                <h4>{$item['name']}</h4>{if $item['is_hot'] == 1}<p>精品课</p>{/if}
                                <span> {php echo date('Y/m/d',$item['start'])}-{php echo date('Y/m/d',$item['end'])}</span>
                                <span> {if !empty($category[$item['bj_id']])}{$category[$item['bj_id']]['sname']}{/if}</span>
                                <span> {if !empty($category[$item['km_id']])}{$category[$item['km_id']]['sname']}{/if}</span>
                                <!--通过hot、add和new分别设置热报、正在报名和新增 -->
								{if $item['end']<TIMESTAMP}
								<div class="hot">
                                    <div style="font-size:12px;">已完</div>                                   
                                    <a href="{php echo $this->createMobileUrl('mykcinfo', array('id' => $item['id'], 'schoolid' =>$item['schoolid']), true)}">查看详情</a>
                                </div>
								{else}
                                <div class="add">
                                    <div style="font-size:12px;">{php echo pdo_fetchcolumn("select count(*) FROM ".tablename('wx_school_kcbiao')." WHERE kcid = '".$item['id']."'")}节</div>
                                    <span>剩余{php echo pdo_fetchcolumn("select count(*) FROM ".tablename('wx_school_kcbiao')." WHERE date>'".TIMESTAMP."' And kcid = '".$item['id']."'")}节</span>
                                    <a href="{php echo $this->createMobileUrl('mykcinfo', array('id' => $item['id'],'schoolid' =>$item['schoolid']), true)}">查看详情</a>
                                </div>
								{/if}
                           </li>
				{/loop}
				</ul>
				{if $school['issale'] != 5}
				<h3>自主报名课程</h3>
				<ul>
				{loop $list1 $item1}
                           <li class="{if $kecheng[$item1['kcid']]['end'] < TIMESTAMP}closed{/if}" href="#">
                                <h4>{$kecheng[$item1['kcid']]['name']}</h4>{if $kecheng[$item1['kcid']]['is_hot'] == 1}<p>精品课</p>{/if}
                                <span> {php echo date('Y/m/d',$kecheng[$item1['kcid']]['start'])}-{php echo date('Y/m/d',$kecheng[$item1['kcid']]['end'])}</span>
                                {if $school['issale'] == 1 || $school['issale'] == 3}
								<span> {$category[$kecheng[$item1['kcid']]['bj_id']]['sname']}</span>
								{/if}
                                <span> {$category[$kecheng[$item1['kcid']]['km_id']]['sname']}</span>
                                <!--通过hot、add和new分别设置热报、正在报名和新增 -->
								{if $kecheng[$item1['kcid']]['end']<TIMESTAMP}
								<div class="hot">
                                    <div style="font-size:12px;">已完</div>                                   
                                    <a href="{php echo $this->createMobileUrl('mykcinfo', array('id' => $item1['kcid'], 'schoolid' =>$item1['schoolid']), true)}">查看详情</a>
                                </div>
								{else}
                                <div class="add">
                                    <div style="font-size:12px;">{php echo pdo_fetchcolumn("select count(*) FROM ".tablename('wx_school_kcbiao')." WHERE kcid = '".$item1['kcid']."'")}节</div>
                                    <span>剩余{php echo pdo_fetchcolumn("select count(*) FROM ".tablename('wx_school_kcbiao')." WHERE date>'".TIMESTAMP."' And kcid = '".$item1['kcid']."'")}节</span>
                                    <a href="{php echo $this->createMobileUrl('mykcinfo', array('id' => $item1['kcid'],'schoolid' =>$item1['schoolid']), true)}">查看详情</a>
                                </div>
								{/if}
                           </li>
				{/loop}
				{loop $list2 $item2}
                           <li class="{if $kecheng[$item2['kcid']]['end'] < TIMESTAMP}closed{/if}" href="#">
                                <h4>{$kecheng[$item2['kcid']]['name']}</h4>{if $kecheng[$item2['kcid']]['is_hot'] == 1}<p>精品课</p>{/if}
                                <span> {php echo date('Y/m/d',$kecheng[$item2['kcid']]['start'])}-{php echo date('Y/m/d',$kecheng[$item2['kcid']]['end'])}</span>
                                {if $school['issale'] == 1 || $school['issale'] == 3}
								<span> {$category[$kecheng[$item2['kcid']]['bj_id']]['sname']}</span>
								{/if}
                                <span> {$category[$kecheng[$item2['kcid']]['km_id']]['sname']}</span>
                                <!--通过hot、add和new分别设置热报、正在报名和新增 -->
								{if $kecheng[$item2['kcid']]['end']<TIMESTAMP}
								<div class="hot">
                                    <div style="font-size:12px;">已完</div>                                   
                                    <a href="{php echo $this->createMobileUrl('mykcinfo', array('id' => $item2['kcid'], 'schoolid' =>$item2['schoolid']), true)}">查看详情</a>
                                </div>
								{else}
                                <div class="add">
                                    <div style="font-size:12px;">{php echo pdo_fetchcolumn("select count(*) FROM ".tablename('wx_school_kcbiao')." WHERE kcid = '".$item2['kcid']."'")}节</div>
                                    <span>剩余{php echo pdo_fetchcolumn("select count(*) FROM ".tablename('wx_school_kcbiao')." WHERE date>'".TIMESTAMP."' And kcid = '".$item2['kcid']."'")}节</span>
                                    <a href="{php echo $this->createMobileUrl('mykcinfo', array('id' => $item2['kcid'],'schoolid' =>$item2['schoolid']), true)}">查看详情</a>
                                </div>
								{/if}
                           </li>
				{/loop}				
                {/if}				
                </ul>


            </dd>

        </dl>
    </div>
{php include $this->template('footer');}  
<script type="text/javascript">
$(document).ready(function(e) {
	$("#wrap").css("min-height", $(document).height())
});
WeixinJSHideAllNonBaseMenuItem();
/**微信隐藏工具条**/
function WeixinJSHideAllNonBaseMenuItem(){
	if (typeof wx != "undefined"){
		wx.ready(function () {
			
			wx.hideAllNonBaseMenuItem();
		});
	}
}
</script>	
</body>
</html>